﻿<stz:AutoSizeUserControl x:Class="Demo.ColorPickerDemo"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:stz="clr-namespace:Stanza.Silverlight.Controls;assembly=Stanza.Silverlight.Controls" Width="800" Height="600" MinWidth="300" MinHeight="200" ExtraHeight="140" ExtraWidth="20" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d">
	<stz:AutoSizeUserControl.Resources>
		<Style x:Key="BackgroundTextStyle" TargetType="TextBlock">
			<Setter Property="FontSize" Value="72"/>
			<Setter Property="FontWeight" Value="Bold"/>
			<Setter Property="FontFamily" Value="Portable User Interface"/>
			<Setter Property="TextAlignment" Value="Center"/>
		</Style>
	</stz:AutoSizeUserControl.Resources>
	<Grid x:Name="LayoutRoot" Background="White">
		<Grid>
			<StackPanel HorizontalAlignment="Center" VerticalAlignment="Center" RenderTransformOrigin="0.5,0.5">
				<StackPanel.RenderTransform>
					<TransformGroup>
						<ScaleTransform/>
						<SkewTransform/>
						<RotateTransform Angle="-30"/>
						<TranslateTransform/>
					</TransformGroup>
				</StackPanel.RenderTransform>
				<TextBlock Text="Color Picker" Style="{StaticResource BackgroundTextStyle}"/>
				<TextBlock Text="Demonstration" Style="{StaticResource BackgroundTextStyle}"/>
			</StackPanel>
			<Rectangle Stroke="#FF0000FF" RadiusX="64" RadiusY="64" StrokeThickness="10" x:Name="demoRect" d:IsHidden="True">
				<Rectangle.Fill>
					<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
						<GradientStop Color="#FF000000"/>
						<GradientStop Color="#FFFFFFFF" Offset="1"/>
					</LinearGradientBrush>
				</Rectangle.Fill>
			</Rectangle>
			<Grid HorizontalAlignment="Center" VerticalAlignment="Center" Width="350" Height="150" d:IsHidden="True">
				<Grid.RowDefinitions>
					<RowDefinition/>
					<RowDefinition/>
					<RowDefinition/>
					<RowDefinition/>
				</Grid.RowDefinitions>
				<Grid.ColumnDefinitions>
					<ColumnDefinition Width="133"/>
					<ColumnDefinition/>
				</Grid.ColumnDefinitions>
				<TextBlock Text="Fill Start Color:" HorizontalAlignment="Left" VerticalAlignment="Center"/>
				<TextBlock Text="Fill End Color:" Grid.Column="0" Grid.Row="1" HorizontalAlignment="Left" VerticalAlignment="Center"/>
				<TextBlock Text="Border Color:" Grid.Row="2" HorizontalAlignment="Left" VerticalAlignment="Center"/>
				<stz:PopupColorPicker Grid.Column="1" x:Name="startColorPicker" SelectedColor="Gray" />
				<stz:PopupColorPicker Grid.Column="1" Grid.Row="1" x:Name="endColorPicker" SelectedColor="White" />
				<stz:PopupColorPicker Grid.Column="1" Grid.Row="2" x:Name="borderColorPicker" SelectedColor="Black" />
				<Button Height="26" x:Name="showFullScreen" Content="Full Screen" VerticalAlignment="Center" HorizontalAlignment="Center" Width="80" Grid.Row="3" Grid.ColumnSpan="2"/>
			</Grid>
		</Grid>
	</Grid>
</stz:AutoSizeUserControl>
